package es.xpt.ysf.commons.person;

import java.util.ArrayList;
import java.util.List;

import javax.ejb.Local;

import es.xpt.ysf.YSFException;
import es.xpt.ysf.commons.person.model.Person;

@Local
public interface PersonSession {

	public Person getPerson(String id) throws YSFException;

	public void updatePerson(Person person) throws YSFException;

	public Person insertPerson(Person person) throws YSFException;

	public void deletePerson(String id) throws YSFException;

	public List<Person> getEntityPeople(String entity, String entityId) throws YSFException;
	
	public Person getEntityPersonByRole(String entity, String entityId, String role) throws YSFException;

	public void addEntityPerson(String entityId, String entity,
			String personId, String role) throws YSFException;

	public void removeEntityPerson(String entityId, String entity,
			String personId, String role) throws YSFException;

	public List<Person> searchPerson(String name) throws YSFException;
	
	public List<Person> searchPerson(Person person) throws YSFException;
	
	public ArrayList<String[]> searchDependentEntities(String personId) throws YSFException;

	public List<String> searchEntityDependences(String personId, String entity) throws YSFException;

	public Person insertPerson(Person person, String entity, String entityId) throws YSFException;

	public List<String> deleteBatchPeople(List<String> listCodePeople) throws YSFException;
	public void deleteBatchPeopleNewTransactional(List<String> listPerson) throws YSFException;
	public void deletePersonNewTransactional(String codePerson) throws YSFException;
	
}
